/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.client;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.DeckPanel;
import com.google.gwt.user.client.ui.HTML;



public class LoginPresenter {
    
    Display display;
    DeckPanel deck;

    
    interface Display{
    
        HTML getCadastro();
    }
    
    LoginPresenter(Display tela, DeckPanel deck){
    
        this.display = tela;
        this.deck = deck;
        bind();
    
    }
    
    private void bind() {
        display.getCadastro().addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                deck.showWidget(1);
                
                  }
        });
         }
    
}
